from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()


#商品列表
class Toos(db.Model):
    id = db.Column(db.Integer, autoincrement=True, primary_key=True, comment='商品id')
    name = db.Column(db.String(200), comment='商品名')
    img = db.Column(db.String(500), comment='商品图片')
    goog= db.Column(db.String(200), comment='供应商')
    shi= db.Column(db.String(200), comment='是否')
    dan= db.Column(db.String(200), comment='单价')
    shu = db.Column(db.String(20), comment='数量')
    xiao = db.Column(db.String(200), comment='小计')
    chong = db.relationship('Fees', backref='toos')



#商品详情
class  Fees(db.Model):
    id=db.Column(db.Integer,primary_key=True)
    name = db.Column(db.String(200),comment='内容')
    fee_id=db.Column(db.Integer,db.ForeignKey('toos.id'),comment='详情')




